package GUILayer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextArea;

import java.awt.Color;

import javax.swing.border.TitledBorder;

import java.awt.SystemColor;

import javax.swing.JTabbedPane;

import java.awt.TextField;
import java.awt.Label;
import java.awt.Choice;
import java.awt.Checkbox;
import java.awt.Button;
import java.awt.event.ActionListener;
import javax.swing.JSeparator;
import java.awt.TextArea;

public class wsCore extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					wsCore frame = new wsCore();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public wsCore() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		//setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBackground(SystemColor.activeCaption);
		this.setExtendedState(JFrame.MAXIMIZED_BOTH);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBackground(SystemColor.activeCaption);
		panel.setBorder(new TitledBorder(null, "Order List", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(30, 49, 271, 650);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JTextArea textArea = new JTextArea();
		textArea.setBounds(6, 16, 259, 627);
		panel.add(textArea);
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setBounds(308, 54, 968, 642);
		contentPane.add(tabbedPane);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBackground(SystemColor.inactiveCaption);
		tabbedPane.addTab("Order View", null, panel_1, null);
		panel_1.setLayout(null);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBackground(new Color(240, 230, 140));
		panel_2.setBorder(new TitledBorder(null, "Order Information:", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_2.setBounds(26, 55, 430, 117);
		panel_1.add(panel_2);
		panel_2.setLayout(null);
		
		Label label = new Label("Order ID:");
		label.setBounds(10, 28, 49, 22);
		panel_2.add(label);
		
		TextField orderView_id = new TextField();
		orderView_id.setEnabled(false);
		orderView_id.setBounds(96, 28, 93, 22);
		panel_2.add(orderView_id);
		
		Label label_1 = new Label("Creation date:");
		label_1.setBounds(195, 28, 80, 22);
		panel_2.add(label_1);
		
		TextField textField_1 = new TextField();
		textField_1.setEnabled(false);
		textField_1.setBounds(281, 28, 113, 22);
		panel_2.add(textField_1);
		
		Label label_2 = new Label("Order status:");
		label_2.setBounds(10, 65, 72, 22);
		panel_2.add(label_2);
		
		TextField textField = new TextField();
		textField.setEnabled(false);
		textField.setText("New order");
		textField.setBounds(96, 65, 93, 22);
		panel_2.add(textField);
		
		Label label_3 = new Label("Delivery date:");
		label_3.setBounds(195, 65, 72, 22);
		panel_2.add(label_3);
		
		TextField textField_2 = new TextField();
		textField_2.setEnabled(false);
		textField_2.setBounds(281, 65, 113, 22);
		panel_2.add(textField_2);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBackground(new Color(245, 222, 179));
		panel_3.setBorder(new TitledBorder(null, "Customer Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_3.setBounds(26, 183, 430, 214);
		panel_1.add(panel_3);
		panel_3.setLayout(null);
		
		Label label_4 = new Label("Customer:");
		label_4.setBounds(10, 29, 69, 22);
		panel_3.add(label_4);
		
		Choice choice = new Choice();
		choice.setBounds(85, 29, 306, 20);
		panel_3.add(choice);
		
		Checkbox checkbox = new Checkbox("New Customer");
		checkbox.setBounds(10, 57, 139, 22);
		panel_3.add(checkbox);
		
		Label label_5 = new Label("Name:");
		label_5.setBounds(10, 111, 37, 22);
		panel_3.add(label_5);
		
		TextField textField_3 = new TextField();
		textField_3.setEnabled(false);
		textField_3.setBounds(97, 111, 294, 22);
		panel_3.add(textField_3);
		
		Label label_6 = new Label("Address:");
		label_6.setBounds(10, 139, 55, 22);
		panel_3.add(label_6);
		
		TextField textField_4 = new TextField();
		textField_4.setEnabled(false);
		textField_4.setBounds(97, 139, 294, 22);
		panel_3.add(textField_4);
		
		Label label_7 = new Label("Zip Code:");
		label_7.setBounds(10, 167, 62, 22);
		panel_3.add(label_7);
		
		TextField textField_5 = new TextField();
		textField_5.setEnabled(false);
		textField_5.setBounds(97, 167, 125, 22);
		panel_3.add(textField_5);
		
		Label label_8 = new Label("City:");
		label_8.setBounds(228, 167, 28, 22);
		panel_3.add(label_8);
		
		TextField textField_6 = new TextField();
		textField_6.setEnabled(false);
		textField_6.setBounds(262, 167, 129, 22);
		panel_3.add(textField_6);
		
		Label label_9 = new Label("Customer ID:");
		label_9.setBounds(10, 83, 82, 22);
		panel_3.add(label_9);
		
		TextField textField_7 = new TextField();
		textField_7.setEnabled(false);
		textField_7.setBounds(98, 83, 68, 22);
		panel_3.add(textField_7);
		
		JSeparator separator = new JSeparator();
		separator.setBounds(11, 54, 399, 2);
		panel_3.add(separator);
		
		Label label_22 = new Label("Customer type:");
		label_22.setBounds(177, 83, 97, 22);
		panel_3.add(label_22);
		
		Choice choice_2 = new Choice();
		choice_2.setBounds(280, 83, 111, 20);
		panel_3.add(choice_2);
		
		  Icon new1 = new ImageIcon("/D:/Irena/BGM.Irena/BGM.Irena.ClientApp/BGM.Irena.Client/Resources/icon_new.png");
	      JButton order_new = new JButton(new1); 
	      order_new.setToolTipText("New Order");
	      
	     
	      order_new.setBackground(SystemColor.activeCaption);
	      order_new.setBounds(26, 22, 34, 22);
	      panel_1.add(order_new);
	      
	      Icon new2 = new ImageIcon("/D:/Irena/BGM.Irena/BGM.Irena.ClientApp/BGM.Irena.Client/Resources/disk.png");
	      JButton order_save = new JButton(new2); 
	      order_save.setToolTipText("Save Order");
	      
	     
	      order_save.setBackground(SystemColor.activeCaption);
	      order_save.setBounds(60, 22, 34, 22);
	      panel_1.add(order_save);
	      
	      Icon new3 = new ImageIcon("/D:/Irena/BGM.Irena/BGM.Irena.ClientApp/BGM.Irena.Client/Resources/coins-icon.png");
	      
	      JPanel panel_4 = new JPanel();
	      panel_4.setBackground(new Color(238, 232, 170));
	      panel_4.setBorder(new TitledBorder(null, "Delivery Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
	      panel_4.setBounds(26, 408, 430, 178);
	      panel_1.add(panel_4);
	      panel_4.setLayout(null);
	      
	      Label label_10 = new Label("Delivery address:");
	      label_10.setBounds(10, 46, 95, 22);
	      panel_4.add(label_10);
	      
	      TextField textField_8 = new TextField();
	      textField_8.setEnabled(false);
	      textField_8.setBounds(111, 46, 280, 22);
	      panel_4.add(textField_8);
	      
	      Label label_11 = new Label("Recipient name:");
	      label_11.setBounds(10, 74, 90, 22);
	      panel_4.add(label_11);
	      
	      Checkbox checkbox_1 = new Checkbox("Include delivery");
	      checkbox_1.setBounds(10, 18, 123, 22);
	      panel_4.add(checkbox_1);
	      
	      TextField textField_9 = new TextField();
	      textField_9.setEnabled(false);
	      textField_9.setBounds(111, 74, 280, 22);
	      panel_4.add(textField_9);
	      
	      Label label_12 = new Label("Delivery price:");
	      label_12.setBounds(111, 146, 83, 22);
	      panel_4.add(label_12);
	      
	      TextField textField_10 = new TextField();
	      textField_10.setEnabled(false);
	      textField_10.setBounds(198, 146, 83, 22);
	      panel_4.add(textField_10);
	      
	      Label label_13 = new Label("DKK");
	      label_13.setBounds(287, 146, 62, 22);
	      panel_4.add(label_13);
	      
	      Checkbox checkbox_2 = new Checkbox("Cash on delivery");
	      checkbox_2.setBounds(139, 18, 130, 22);
	      panel_4.add(checkbox_2);
	      
	      Checkbox checkbox_3 = new Checkbox("Delivered");
	      checkbox_3.setBounds(10, 146, 95, 22);
	      panel_4.add(checkbox_3);
	      
	      JSeparator separator_1 = new JSeparator();
	      separator_1.setBounds(10, 138, 410, 2);
	      panel_4.add(separator_1);
	      
	      Label label_14 = new Label("Contact:");
	      label_14.setBounds(10, 102, 62, 22);
	      panel_4.add(label_14);
	      
	      TextField textField_11 = new TextField();
	      textField_11.setEnabled(false);
	      textField_11.setBounds(111, 102, 280, 22);
	      panel_4.add(textField_11);
	      
	      JPanel panel_5 = new JPanel();
	      panel_5.setBackground(new Color(233, 150, 122));
	      panel_5.setBorder(new TitledBorder(null, "Order Products:", TitledBorder.LEADING, TitledBorder.TOP, null, null));
	      panel_5.setBounds(466, 55, 475, 342);
	      panel_1.add(panel_5);
	      panel_5.setLayout(null);
	      
	      Label label_15 = new Label("Select product:");
	      label_15.setBounds(10, 24, 89, 22);
	      panel_5.add(label_15);
	      
	      TextField textField_12 = new TextField();
	      textField_12.setBounds(160, 22, -61, 22);
	      panel_5.add(textField_12);
	      
	      Choice choice_1 = new Choice();
	      choice_1.setBounds(105, 24, 360, 20);
	      panel_5.add(choice_1);
	      
	      Label label_16 = new Label("Amount:");
	      label_16.setBounds(10, 52, 54, 22);
	      panel_5.add(label_16);
	      
	      TextField textField_13 = new TextField();
	      textField_13.setBounds(105, 52, 62, 22);
	      panel_5.add(textField_13);
	      
	      Button button = new Button("Add product");
	      button.setBounds(173, 52, 80, 22);
	      panel_5.add(button);
	      
	      Button button_1 = new Button("Delete product");
	      button_1.setBounds(259, 52, 89, 22);
	      panel_5.add(button_1);
	      
	      TextArea textArea_1 = new TextArea();
	      textArea_1.setBounds(10, 92, 455, 212);
	      panel_5.add(textArea_1);
	      
	      JSeparator separator_2 = new JSeparator();
	      separator_2.setBounds(10, 81, 455, 8);
	      panel_5.add(separator_2);
	      
	      Checkbox checkbox_4 = new Checkbox("Discount");
	      checkbox_4.setBounds(259, 310, 104, 22);
	      panel_5.add(checkbox_4);
	      
	      Label label_23 = new Label("Product price total:");
	      label_23.setBounds(10, 310, 104, 22);
	      panel_5.add(label_23);
	      
	      TextField textField_18 = new TextField();
	      textField_18.setBounds(119, 310, 89, 22);
	      panel_5.add(textField_18);
	      
	      Label label_24 = new Label("DKK");
	      label_24.setBounds(214, 310, 62, 22);
	      panel_5.add(label_24);
	      
	      JPanel panel_6 = new JPanel();
	      panel_6.setBackground(new Color(240, 230, 140));
	      panel_6.setBorder(new TitledBorder(null, "Invoice Information", TitledBorder.LEADING, TitledBorder.TOP, null, null));
	      panel_6.setBounds(466, 408, 475, 178);
	      panel_1.add(panel_6);
	      panel_6.setLayout(null);
	      
	      Label label_17 = new Label("Invoice No:");
	      label_17.setBounds(10, 26, 62, 22);
	      panel_6.add(label_17);
	      
	      TextField textField_14 = new TextField();
	      textField_14.setEnabled(false);
	      textField_14.setBounds(97, 26, 85, 22);
	      panel_6.add(textField_14);
	      
	      Label label_18 = new Label("Invoice Date:");
	      label_18.setBounds(204, 26, 76, 22);
	      panel_6.add(label_18);
	      
	      TextField textField_15 = new TextField();
	      textField_15.setBounds(286, 26, 115, 22);
	      panel_6.add(textField_15);
	      
	      JSeparator separator_3 = new JSeparator();
	      separator_3.setBounds(10, 91, 449, 8);
	      panel_6.add(separator_3);
	      
	      Label label_19 = new Label("Invoice Amount:");
	      label_19.setBounds(10, 105, 85, 22);
	      panel_6.add(label_19);
	      
	      TextField textField_16 = new TextField();
	      textField_16.setBounds(97, 105, 85, 22);
	      panel_6.add(textField_16);
	      
	      Label label_20 = new Label("DKK");
	      label_20.setBounds(185, 105, 35, 22);
	      panel_6.add(label_20);
	      
	      Label label_21 = new Label("Payment date:");
	      label_21.setBounds(10, 54, 76, 22);
	      panel_6.add(label_21);
	      
	      TextField textField_17 = new TextField();
	      textField_17.setEnabled(false);
	      textField_17.setBounds(97, 54, 85, 22);
	      panel_6.add(textField_17);
	      
	      Checkbox checkbox_5 = new Checkbox("Is Paid?");
	      checkbox_5.setBounds(226, 105, 95, 22);
	      panel_6.add(checkbox_5);
	      JButton order_invoice = new JButton(new3);
	      order_invoice.setBounds(422, 22, 34, 22);
	      panel_1.add(order_invoice);
	      order_invoice.setToolTipText("Calculate Invoice");
	      
	     
	      order_invoice.setBackground(SystemColor.activeCaption);
	}
}
